package com.sanhuo.security.filter;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.logging.Logger;


@Component
public class UrlFilter extends HandlerInterceptorAdapter {

    private static Logger log = Logger.getLogger(UrlFilter.class.getName());

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        String url = request.getRequestURI();
        log.info("用户正在调用:[ " + url + " ]接口");
        return true;
    }


}